
export const PARAMS_PURCHASE_PLAN = [
    {
        type: "DatePicker",
        field: "time",
        title: "申请时间",
        value: "",
        props: {
            type: "daterange",
            format: "yyyy-MM-dd",
            "start-placeholder":"开始日期",
            "end-placeholder":"结束日期",
        }
    },
    {
      type:'el-button',
      field:'search',
      props:{
          type:'primary',
          icon:"el-icon-search"
      },
      children:['搜索'],
      emit: ['click'],
      emitPrefix: 'btn-search',
    },
    {
      type:'el-button',
      field:'reset',
      props:{
          type:'primary',
          icon:"el-icon-setting"
      },
      children:['重置'],
      emit: ['click'],
      emitPrefix: 'btn-reset',
    },
    {
      type:'el-button',
      field:'add',
      props:{
          type:'danger',
          icon:"el-icon-plus",
          style:"display:block"
      },
      children:['新增'],
      emit: ['click'],
      emitPrefix: 'btn-add',
    },
    {
      type:'el-button',
      field:'delBatch',
      props:{
          type:'danger',
          icon:"el-icon-delete",
      },
      children:['批量删除'],
      emit: ['click'],
      emitPrefix: 'btn-del-batch',
    }
  ]
  
  export let FORM_PURCHASE_PLAN = [
    {
      type: "input",
      field: "name",
      title: "主题",
      value: "",
      col: { span: 12 },
      props: { style:'width:100%',placeholder:"请输入主题"},
      validate: [
        { required: true, message: "请输入主题", trigger: "blur" }
      ]
    },
    {
      type: "DatePicker",
      field: "startTime",
      title: "预计进场时间",
      value: "",
      col: { span: 12 },
      props: { 
        type: "date",
        style:"width:100%",
        format: "yyyy-MM-dd",
        placeholder:"请选择预计进场时间"
      },
      validate: [
        { required: true, message: "请选择预计进场时间", trigger: "blur" }
      ]
    },
    {
      type: "input",
      field: "budget",
      title: "预算控制成本",
      value: "",
      col: { span: 12 },
      props: { 
        placeholder:"请输入预算控制成本"
      }
    },
    {
        type: "input",
        field: "payType",
        title: "合同款项支付方式",
        value: "",
        col: { span: 12 },
        props: { type: "text" },
        validate: [
          { required: true, message: "请输入合同款项支付方式", trigger: "blur" }
        ]
    },
    {
        type: "input",
        field: "bidContent",
        title: "招标内容",
        value: "",
        col: { span: 24 },
        props: { type: "textarea" },
        validate: [
          { required: true, message: "请输入招标内容", trigger: "blur" }
        ]
      },
      {
        type: "input",
        field: "contractingScope",
        title: "承包范围",
        value: "",
        col: { span: 24 },
        props: { type: "textarea" },
        validate: [
          { required: true, message: "请输入承包范围", trigger: "blur" }
        ]
      },
      {
        type: "input",
        field: "contractForm",
        title: "合同形式",
        value: "",
        col: { span: 24 },
        props: { type: "textarea" },
        validate: [
          { required: true, message: "请输入合同形式", trigger: "blur" }
        ]
      },
      {
        type: "input",
        field: "qualification",
        title: "施工队伍资质要求",
        value: "",
        col: { span: 24 },
        props: { type: "textarea" },
        validate: [
          { required: true, message: "请输入施工队伍资质要求", trigger: "blur" }
        ]
      },
      {
        type: "input",
        field: "files",
        title: "规格参数或施工方案",
        value: "",
        col: { span: 12 },
        props: { disabled:true,placeholder:"请上传附件"},
        validate: [
          { required: true, message: "请上传附件", trigger: "blur" }
        ],
        children: [
          {
               type:'el-button',
               props:{
                  type:'primary',
              },
               children:['选择文件'],
               slot:'suffix',
               emit: ['click'],
              emitPrefix: 'btn-pdf'
          }
       ]
      }
]

/* export const FORM_LABOUR = [
  {
    type: "select",
    field: "major",
    title: "专业分包",
    value: '',
    options: [],
    props:{placeholder:"请选择专业分包",clearable:true},
    col:{span:8},
    nativeEmit:['click'],
    emit:['change', 'blur'],
    emitPrefix:'major'
  },
  {
      type: "select",
      field: "subpackage",
      title: "劳务分包",
      value: "",
      options:[],
      props: {placeholder:"请选择劳务分包",clearable:true},
      nativeEmit:['click']
  }
] */

//采购计划
export const PURCHASE_TAB = [
  {label:"内勤审核",value:"12"},
  {label:"分管领导审核",value:"13"},
  {label:"总经理审核",value:"14"},
  {label:"已成功",value:"15"},
  {label:"已终止",value:"16"},
  {label:"已驳回",value:"11"}
]


export const LABEL_PURCHASE_PLAN = [
  { label: "创建时间", prop: "createTime",width:"160",type:'createTime'},
  { label:'', prop: "checkbox",width:"40",type:'checkbox'},
  { label: "主题", prop: "name",width:"160",type:'normal'},
  { label: "预计进场时间", prop: "startTime",width:"160",type:'createTime'},
  { label: "招标内容", prop: "bidContent",width:"180",type:'bidContent'},
  { label: "预算控制成本", prop: "budget",width:"180",type:'budget'},
  { label: "承包范围", prop: "contractingScope",width:"180",type:'contractingScope'},
  { label: "合同形式", prop: "contractForm",width:"180",type:'contractForm'},
  { label: "合同款项支付方式", prop: "payType",width:"180",type:'normal'},
  { label: "施工队伍资质要求", prop: "qualification",width:"180",type:'qualification'},
  { label: "规格参数或施工方案", prop: "files",width:"180",type:'files'},
  { label: "处理人",prop:'handleUserName',width:'150',type:'normal'},
  { label: "创建人", prop: "applyUserName",width:"120",type:'normal'},
  { label: "更新时间", prop: "updateTime",width:"160",type:'createTime'}
]

export const LABEL_PURCHASE_OTHER_PLAN = [
  { label: "创建时间", prop: "createTime",width:"160",type:'createTime'},
  { label:'', prop: "checkbox",width:"40",type:'checkbox'},
  { label: "主题", prop: "name",width:"160",type:'normal'},
  { label: "预计进场时间", prop: "startTime",width:"160",type:'createTime'},
  { label: "招标内容", prop: "bidContent",width:"180",type:'bidContent'},
  { label: "预算控制成本", prop: "budget",width:"180",type:'budget'},
  { label: "承包范围", prop: "contractingScope",width:"180",type:'contractingScope'},
  { label: "合同形式", prop: "contractForm",width:"180",type:'contractForm'},
  { label: "合同款项支付方式", prop: "payType",width:"180",type:'normal'},
  { label: "施工队伍资质要求", prop: "qualification",width:"180",type:'qualification'},
  { label: "规格参数或施工方案", prop: "files",width:"180",type:'files'},
  { label: "驳回理由", prop:'rejectReason',width:"180",type:'rejectReason'},
  { label: "处理人",prop:'handleUserName',width:'150',type:'normal'},
  { label: "创建人", prop: "applyUserName",width:"120",type:'normal'},
  { label: "更新时间", prop: "updateTime",width:"160",type:'createTime'}
]

/*--------------------------------------------------------------------采购待发----------------------------------------------------------------------------------- */

export const PARAMS_PURCHASE_SEND = [
  {
      type: "DatePicker",
      field: "time",
      title: "申请时间",
      value: "",
      props: {
          type: "daterange",
          format: "yyyy-MM-dd",
          "start-placeholder":"开始日期",
          "end-placeholder":"结束日期",
      }
  },
  {
    type:'el-button',
    field:'search',
    props:{
        type:'primary',
        icon:"el-icon-search"
    },
    children:['搜索'],
    emit: ['click'],
    emitPrefix: 'btn-search',
  },
  {
    type:'el-button',
    field:'reset',
    props:{
        type:'primary',
        icon:"el-icon-setting"
    },
    children:['重置'],
    emit: ['click'],
    emitPrefix: 'btn-reset',
  },
  {
    type:'el-button',
    field:'add',
    props:{
        type:'danger',
        icon:"el-icon-plus"
    },
    children:['批量劳务招标申请'],
    emit: ['click'],
    emitPrefix: 'btn-add'
  }
]
export const PURCHASE_SEND_TAB = [
  {label:"邀请采购",value:"2"},
  {label:"公开采购",value:"3"}
]

export const LABEL_LABOUR_PURCHASE_SEND = [
  { label: "创建时间", prop: "createTime",width:"160",type:'createTime'},
  { label: "", prop: "checkbox",width:"45",type:'checkbox'},
  { label: "项目名称", prop: "name",width:"200",type:'normal'},
  { label: "劳务名称", prop: "labourName",width:"180",type:'normal'},
  { label: "劳务类型", prop: "type",width:"180",type:'type'},
  { label: "申请数量", prop: "applyNum",width:"160",type:'normal'},
  { label: "已采购数量", prop: "purchasedNum",width:"160",type:'normal'},
  { label: "未采购数量", prop: "isPurchasedNum",width:"160",type:'isPurchasedNum'},
  { label: "状态", prop: "statusFlag",width:"160",type:'statusFlag'},
  { label: "备注", prop:'remarks',width:"180",type:'remarks'},
  { label: "发起人", prop: "applyUserName",width:"120",type:'normal'},
  { label: "预计进场时间", prop: "startTime",width:"160",type:'createTime'}
]


/**邀请和公开查询 */
export const PARAMS_PURCHASE_INVITATION_OVERT = [
  {
    type: "input",
    field: "name",
    title: "项目名称",
    value: "",
    props: {placeholder:"请输入项目名称"}
  },
  {
      type: "DatePicker",
      field: "time",
      title: "申请时间",
      value: '',
      props: {
        type: "daterange",
        format: "yyyy-MM-dd",
        "start-placeholder":"开始日期",
        "end-placeholder":"结束日期"
      }
  },
  {
    type:'el-button',
    field:'search',
    props:{
        type:'primary',
        icon:"el-icon-search"
    },
    children:['搜索'],
    emit: ['click'],
    emitPrefix: 'btn-search'
  },
  {
    type:'el-button',
    field:'reset',
    props:{
        type:'primary',
        icon:"el-icon-setting"
    },
    children:['重置'],
    emit: ['click'],
    emitPrefix: 'btn-reset'
  }
]



/*---------------------------------------------------------------- 邀请招标 ----------------------------------------------------------------*/

export const FORM_PURCHASE_INVITATION = [
  {
    type: "input",
    field: "name",
    title: "项目名称",
    value: "",
    col: { span: 12 },
    props: { readonly:true,placeholder:"请输入项目名称"},
    validate: [
      { required: true, message: "请输入项目名称", trigger: "blur" }
    ]
  },
  {
    type: "input",
    field: "quoteNum",
    title: "供应商数量",
    value: "",
    col: { span: 12 },
    props: { placeholder:"请输入供应商数量"},
    validate: [
      { required: true, message: "请输入供应商数量", trigger: "blur" }
    ],
  },
  {
    type: "DatePicker",
    field: "startTime",
    title: "报名开始时间",
    value: "",
    col: { span: 12 },
    props: { 
      type: "datetime",
      style:"width:100%",
      format: "yyyy-MM-dd HH:mm:ss",
      placeholder:"请选择报名开始时间"
    },
    validate: [
      { required: true, message: "请选择报名开始时间", trigger: "blur" }
    ]
  },
  {
    type: "datePicker",
    field: "endTime",
    title: "报名结束时间",
    value: "",
    col: { span: 12 },
    props: { 
      type: "datetime",
      style:"width:100%",
      format: "yyyy-MM-dd HH:mm:ss",
      placeholder:"请选择报名结束时间"
    },
    validate: [
      { required: true, message: "请选择报名结束时间", trigger: "blur" }
    ]
  },
  {
    type: "input",
    field: "receiverName",
    title: "收货人（自动从项目名称关联收货人）",
    value: "",
    col: { span: 12 },
    props: { placeholder:"请输入收货人"},
    validate: [
      { required: true, message: "请输入收货人", trigger: "blur" }
    ],
    children: [
      {
           type:'el-button',
           className:'class3',
           props:{
              type:'primary'
          },
           children:['选择项目库'],
           slot: 'suffix',
           emit: ['click'],
          emitPrefix: 'btn-project'
      }
   ]
  },
  {
    type: "input",
    field: "receiverPhone",
    title: "收货人电话（自动从项目名称关联电话）",
    value: "",
    col: { span: 12 },
    props: { placeholder:"请输入收货人电话",maxlength:"11"},
    validate: [
      { required: true, message: "请输入收货人电话", trigger: "blur" },
      {
        validator: (rule, val, d) => {
          val && !/^1(3[0-9]|4[0-9]|5[0-9]|6[0-9]|7[0-9]|8[0-9]|9[0-9])\d{8}$/.test(val) ? d(true) : d();
        },
        message: "手机格式错误"
      }
    ]
  },
  {
    type: "input",
    field: "payType",
    title: "付款方式",
    value: "",
    col: { span: 12 },
    props: {placeholder:"请输入付款方式"}
  },
  {
    type: "radio",
    field: "isOpen",
    title: "是否公开（选择公开，库内所有供应商都能进行报名）",
    value: "1",
    options:[{value:"1",label:'不公开'},{value:"2",label:'公开'}],
    col: { span: 12 },
    props: {placeholder:"请选择是否公开",style:"width:100%"},
    validate: [
      { required: true, message: "请选择是否公开", trigger: "blur" },
    ]
  },
  {
    type: "input",
    field: "address",
    title: "收货地址（自动从项目名称关联地址）",
    value: "",
    col: { span: 24 },
    props: {type: "textarea", placeholder:"请输入收货地址"},
    validate: [
      { required: true, message: "请输入收货地址", trigger: "blur" },
    ]
  },
  {
    type: "input",
    field: "remarks",
    title: "其他说明",
    value: "",
    col: { span: 24 },
    props: { type: "textarea" }
  },
  {
    type: "input",
    field: "reason",
    title: "采购原因",
    value: "",
    col: { span: 24 },
    props: { type: "textarea" }
  },
  {
    type: "input",
    field: "files",
    title: "附件",
    value: "",
    col: { span: 12 },
    props: { disabled:true,placeholder:"请上传附件"},
    validate: [
      { required: true, message: "请上传附件", trigger: "blur" }
    ],
    children: [
      {
           type:'el-button',
           props:{
              type:'primary',
          },
           children:['选择文件'],
           slot:'suffix',
           emit: ['click'],
          emitPrefix: 'btn-pdf'
      }
   ]
  }
]



export const LABEL_PURCHASE_INVITATION = [
    { label: "创建时间", prop: "createTime",width:"160",type:'createTime'},
    { label: "项目名称", prop: "name",width:"160",type:'normal'},
    { label: "开始时间", prop:'startTime',width:"180",type:'createTime'},
    { label: "结束时间", prop: "endTime",width:"200",type:'createTime'},
    { label: "供应商数量", prop: "quoteNum",width:"160",type:'normal'},
    { label: "已报名供应商数量", prop: "supplierNum",width:"160",type:'normal'},
    { label: "开标时间", prop: "openTime",width:"160",type:'openTime'},
    { label: "中标价（元）", prop: "winningMoney",width:"160",type:'normal'},
    { label: "中标供应商名称", prop: "winningSupplierName",width:"180",type:'normal'},
    { label: "付款方式", prop: "payType",width:"120",type:'normal'},
    { label: "标状态", prop: "status",width:"120",type:'status'},
    { label: "是否公开", prop:'gsFlag',width:"180",type:'gsFlag'},
    { label: "备注", prop:'remarks',width:"180",type:'remarks'},
    { label: "申请人", prop: "createUserName",width:"120",type:'normal'},
    { label: "更新时间", prop: "updateTime",width:"160",type:'updateTime'}
]
export const LABEL_PURCHASE_INVITATION_SUPPLIER = [
  { label: "创建时间", prop: "createTime",width:"160",type:'createTime'},
  { label: "项目名称", prop: "name",width:"160",type:'normal'},
  { label: "供应商数量", prop: "quoteNum",width:"160",type:'normal'},
 /*  { label: "已报名供应商数量", prop: "supplierNum",width:"160",type:'normal'}, */
  { label: "报名开始时间", prop: "startTime",width:"200",type:'createTime'},
  { label: "报名结束时间", prop: "endTime",width:"200",type:'createTime'},
  { label: "开标时间", prop: "openTime",width:"160",type:'openTime'},
  { label: "是否中标", prop: "winningSupplierId",width:"160",type:'winningSupplierId'},
  { label: "付款方式", prop: "payType",width:"150",type:'normal'},
  { label: "标状态", prop:'status',width:"180",type:'status'},
  { label: "附件", prop:'files',width:"180",type:'files'},
  { label: "申请人", prop: "createUserName",width:"120",type:'normal'},
  { label: "备注", prop:'remarks',width:"180",type:'remarks'}
]


/* -------------------------------------------------------公开招标 ---------------------------------------------------------------*/
export const FORM_PURCHASE_OVERT = [
  {
    type: "input",
    field: "name",
    title: "项目名称",
    value: "",
    col: { span: 12 },
    props: { readonly:true,placeholder:"请输入项目"},
    validate: [
      { required: true, message: "请选择项目", trigger: "blur" }
    ]
  },
  {
    type: "DatePicker",
    field: "startTime",
    title: "报名开始时间",
    value: "",
    col: { span: 12 },
    props: { 
      type: "datetime",
      style:"width:100%",
      format: "yyyy-MM-dd HH:mm:ss",
      placeholder:"请选择报名开始时间"
    },
    validate: [
      { required: true, message: "请选择报名开始时间", trigger: "blur" }
    ]
  },
  {
    type: "datePicker",
    field: "endTime",
    title: "报名结束时间",
    value: "",
    col: { span: 12 },
    props: { 
      type: "datetime",
      style:"width:100%",
      format: "yyyy-MM-dd HH:mm:ss",
      placeholder:"请选择报名结束时间"
    },
    validate: [
      { required: true, message: "请选择报名结束时间", trigger: "blur" }
    ]
  },
  {
    type: "input",
    field: "receiverName",
    title: "收货人（自动从项目名称关联收货人）",
    value: "",
    col: { span: 12 },
    props: { placeholder:"请输入收货人"},
    validate: [
      { required: true, message: "请输入收货人", trigger: "blur" }
    ],
    children: [
      {
           type:'el-button',
           className:'class3',
           props:{
              type:'primary'
          },
           children:['选择项目库'],
           slot: 'suffix',
           emit: ['click'],
          emitPrefix: 'btn-project'
      }
   ]
  },
  {
    type: "input",
    field: "receiverPhone",
    title: "收货人电话（自动从项目名称关联电话）",
    value: "",
    col: { span: 12 },
    props: { placeholder:"请输入收货人电话",maxlength:"11"},
    validate: [
      { required: true, message: "请输入收货人电话", trigger: "blur" },
      {
        validator: (rule, val, d) => {
          val && !/^1(3[0-9]|4[0-9]|5[0-9]|6[0-9]|7[0-9]|8[0-9]|9[0-9])\d{8}$/.test(val) ? d(true) : d();
        },
        message: "手机格式错误"
      }
    ]
  },
  {
    type: "input",
    field: "payType",
    title: "付款方式",
    value: "",
    col: { span: 12 },
    props: {placeholder:"请输入付款方式"}
  },
  {
    type: "radio",
    field: "offFlag",
    title: "评审状态",
    value: "",
    options:[{value:"0",label:'线上'},{value:"1",label:'线下'}],
    col: { span: 12 },
    props: {placeholder:"请选择评审状态",style:"width:100%"},
    validate: [
      { required: true, message: "请选择评审状态", trigger: "blur" },
    ],
    emit: ['change'],
    emitPrefix: 'btn-off-flag',
  },
  {
    type: "datePicker",
    field: "openTime",
    title: "开标时间（不能小于结束时间）",
    value: "",
    col: { span: 12 },
    props: { 
      type: "datetime",
      style:"width:100%",
      format: "yyyy-MM-dd HH:mm:ss",
      placeholder:"请选择开标时间"
    },
    validate: [
      { required: true, message: "请选择开标时间", trigger: "blur" }
    ]
  },
  {
    type: "input",
    field: "address",
    title: "收货地址（自动从项目名称关联地址）",
    value: "",
    col: { span: 24 },
    props: {type: "textarea", placeholder:"请输入收货地址"},
    validate: [
      { required: true, message: "请输入收货地址", trigger: "blur" },
    ]
  },
  {
    type: "input",
    field: "remarks",
    title: "其他说明",
    value: "",
    col: { span: 24 },
    props: { type: "textarea" }
  },
  {
    type: "input",
    field: "reason",
    title: "公开招标原因",
    value: "",
    col: { span: 24 },
    props: { type: "textarea" }
  },
  {
    type: "input",
    field: "files",
    title: "附件",
    value: "",
    col: { span: 12 },
    props: { disabled:true,placeholder:"请上传附件"},
    validate: [
      { required: true, message: "请上传附件", trigger: "blur" }
    ],
    children: [
      {
           type:'el-button',
           props:{
              type:'primary',
          },
           children:['选择文件'],
           slot:'suffix',
           emit: ['click'],
          emitPrefix: 'btn-pdf'
      }
   ]
  }
]

export const LABEL_PURCHASE_OVERT = [
  { label: "创建时间", prop: "createTime",width:"160",type:'createTime'},
  { label: "项目名称", prop: "name",width:"160",type:'normal'},
  { label: "开始时间", prop:'startTime',width:"180",type:'createTime'},
  { label: "结束时间", prop: "endTime",width:"200",type:'createTime'},
  { label: "已报名供应商数量", prop: "supplierNum",width:"160",type:'normal'},
  { label: "开标时间", prop: "openTime",width:"160",type:'openTime'},
  { label: "评审方式", prop: "offFlag",width:"160",type:'offFlag'},
  { label: "中标价（元）", prop: "winningMoney",width:"160",type:'normal'},
  { label: "中标供应商名称", prop: "winningSupplierName",width:"180",type:'normal'},
  { label: "付款方式", prop: "payType",width:"120",type:'normal'},
  { label: "状态", prop: "status",width:"120",type:'status'},
  { label: "是否公开", prop:'gsFlag',width:"180",type:'gsFlag'},
  { label: "采购原因", prop:'reason',width:"180",type:'reason'},
  { label: "附件", prop:'files',width:"180",type:'files'},
  { label: "备注", prop:'remarks',width:"180",type:'remarks'},
  { label: "申请人", prop: "createUserName",width:"120",type:'normal'},
  { label: "更新时间", prop: "updateTime",width:"160",type:'updateTime'}
]

export const LABEL_PURCHASE_OVERT_SUPPLIER = [
  { label: "创建时间", prop: "createTime",width:"160",type:'createTime'},
  { label: "项目名称", prop: "name",width:"160",type:'normal'},
  { label: "报名开始时间", prop: "startTime",width:"200",type:'createTime'},
  { label: "报名结束时间", prop: "endTime",width:"200",type:'createTime'},
  { label: "评审方式", prop: "offFlag",width:"160",type:'offFlag'},
  { label: "开标时间", prop: "openTime",width:"160",type:'openTime'},
  { label: "是否中标", prop: "winningSupplierId",width:"160",type:'winningSupplierId'},
  { label: "付款方式", prop: "payType",width:"150",type:'normal'},
  { label: "状态", prop:'status',width:"180",type:'status'},
  { label: "附件", prop:'files',width:"180",type:'files'},
  { label: "申请人", prop: "createUserName",width:"120",type:'normal'},
  { label: "采购原因", prop:'reason',width:"180",type:'reason'},
  { label: "备注", prop:'remarks',width:"180",type:'remarks'}
]


  export const OPTION_INLINE = {
    form: { labelWidth: "" ,inline: true,size:"small"},
    resetBtn: false,
    submitBtn: false
  }
  export const OPTION_BLOCK= {
    form: { labelWidth: "" ,size:"small"},
    row:{gutter: 20},
    resetBtn: false,
    submitBtn: false
  }
 
 

